package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;

/**
 * 收藏
 * @author Pengfei
 *
 */
public class FavoritesBean implements IJsonParser, Serializable {
	/**
	 * {
            "created_time": 1394433415.258496,
            "favorite_id": 34,
            "favorite_item_id": 55,
            "favorite_type_id": "posts",
            "identity_hash": "9e160f43a0a0b765c44c58d65997ec68",
            "source": "groups",
            "source_id": 12
        }
	 */
	private float created_time;
    private int favorite_id;
    private int favorite_item_id;
    private String favorite_type_id;
    private String identity_hash;
    private String source;
    private int source_id;
    
	public float getCreated_time() {
		return created_time;
	}

	public void setCreated_time(float created_time) {
		this.created_time = created_time;
	}

	public int getFavorite_id() {
		return favorite_id;
	}

	public void setFavorite_id(int favorite_id) {
		this.favorite_id = favorite_id;
	}

	public int getFavorite_item_id() {
		return favorite_item_id;
	}

	public void setFavorite_item_id(int favorite_item_id) {
		this.favorite_item_id = favorite_item_id;
	}

	public String getFavorite_type_id() {
		return favorite_type_id;
	}

	public void setFavorite_type_id(String favorite_type_id) {
		this.favorite_type_id = favorite_type_id;
	}

	public String getIdentity_hash() {
		return identity_hash;
	}

	public void setIdentity_hash(String identity_hash) {
		this.identity_hash = identity_hash;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public int getSource_id() {
		return source_id;
	}

	public void setSource_id(int source_id) {
		this.source_id = source_id;
	}

	@Override
	public IJsonParser parse(String json) throws Exception {
		if (json != null) {
			GsonBuilder builder = new GsonBuilder();
			Gson gson = builder.create();
			return gson.fromJson(json, FavoritesBean.class);
		}
		return null;
	}

}
